package Temx01;

public class Market {
	private String marketName;
	private Product[] productArray;
	public String getManKetName(){
		return marketName;
	}
	public void setMarketName(String marKetName, String marketName){
		this.marketName=marketName;
	}
	public Product[] getProductArray(){
		return productArray;
	}
	public void setProductArray(Product[] productArray){
		
		this.productArray=productArray;
	}
	Product sell (String name){
		for (int i = 0; i<productArray.length;i++){
			if(productArray[i].getName() == name){
				return productArray[i];
			}
		}
		return null;
	}
}
